package com.lagou;

import com.lagou.bean.ConsumerComponent;

public class Task implements Runnable {
    ConsumerComponent service;
    public Task(ConsumerComponent service ) {
        this.service = service;
    }

    @Override
    public void run() {
        try {
            Thread.sleep(100);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        service.sayHello("world", 0);
        service.sayHello2("world", 0);
        service.sayHello3("world", 0);

    }
}
